﻿IF NOT EXISTS(SELECT 1 FROM SYS.COLUMNS WHERE object_id=OBJECT_ID('Base_Organize') AND name='Z__CLINICCODE')
ALTER TABLE dbo.Base_Organize
ADD Z__CLINICCODE NVARCHAR(200) NULL
GO

UPDATE Base_Organize
SET Z__CLINICCODE=CASE WHEN EnCode='NeoLab' THEN 'LAB' ELSE EnCode END
GO